#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>

int Sn(int n,double d)
{
	return (d / 2) * n * n + (2 - (d / 2)) * n;
}

int main()
{
	int n = 0;
	scanf("%d", &n);

	int ret = Sn(n, 3);
	printf("%d", ret);

	return 0;
}